home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / TeX-inputs / hyphenation / ithyph.tex < prev    next >
Text File  |  1997-04-24  |  9KB  |  211 lines

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%  file ithyph.tex  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %
  3. % Prepared by Claudio Beccari   e-mail  beccari@polito.it
  4. %
  5. %                                       Dipartimento di Elettronica
  6. %                                       Politecnico di Torino
  7. %                                       Corso Duca degli Abruzzi, 24
  8. %                                       10129 TORINO    
  9. %
  10. % \versionnumber{4.3}   \versiondate{24 Jan 1997}
  11. %
  12. % These hyphenation patterns for the Italian language are supposed to comply 
  13. % with the Reccomendation UNI 6461 on hyphenation issued by the Italian 
  14. % Standards Institution (Ente Nazionale di Unificazione UNI).  No guarantee
  15. % or declaration of fitness to any particular purpose is given and any
  16. % liability is disclaimed.
  17. % See comments and loading instructions at the end of the file
  18. \lccode`\'=`\'          % Apostrophe has its own lccode so that it is treated
  19.                         % as a letter
  20.                         %
  21. \patterns{
  22. .anti1  .anti3m2n
  23. .di2s3cine
  24. .e2x
  25. .fran2k3
  26. .circu2m1
  27. .wa2g3n
  28. .ca4p3s
  29. .opto1
  30. .para1
  31. .pre1
  32. .p2s
  33. %.ri1a2    .ri1e2   .re1i2  .ri1o2  .ri1u2
  34. .su2b3lu   .su2b3r
  35. .wel2t1
  36. 3p2sic
  37. 3p2neu1
  38. a1ia a1ie  a1io  a1iu a1uo a1ya 2at.
  39. e1iu e2w
  40. io1i 
  41. o1ia o1ie  o1io  o1iu
  42. u1u 
  43. %
  44. '2
  45. 1b   2bb   2bc   2bd  2bf  2bm  2bn  2bp  2bs  2bt  2bv  
  46.      b2l   b2r   2b.  2b'. 2b''
  47. 1c   2cb   2cc   2cd  2cf  2ck  2cm  2cn  2cq  2cs  2ct  2cz  
  48.      2chh  c2h   2chb ch2r 2chn c2l  c2r  2c.  2c'. 2c'' .c2
  49. 1d   2db   2dd   2dg  2dl  2dm  2dn  2dp  d2r  2ds  2dt  2dv  2dw  
  50.      2d.   2d'.  2d'' .d2
  51. 1f   2fb   2fg   2ff  2fn  f2l  f2r  2fs  2ft  2f.  2f'. 2f'' 
  52. 1g   2gb   2gd   2gf  2gg  g2h  g2l  2gm  g2n  2gp  g2r  2gs  2gt  
  53.      2gv   2gw   2gz  2gh2t     2g.  2g'. 2g'' 
  54. 1h   2hb   2hd   h2l  2hm  2hn  2hr  2hv  2h.  2h'.  2h'' 
  55. 1j   2j.   2j'.  2j''
  56. 1k   2kg   2kf   k2h  2kk  k2l  k2r  2kt  2k.  2k'. 2k''  
  57. 1l   2lb   2lc   2ld  2l3f2     2lg  l2h  2lk  2ll  2lm  2ln  2lp
  58.      2lq   2lr   2ls  2lt  2lv  2lw  2lz  2l.  2l'. 2l''  
  59. 1m   2mb   2mc   2mf  2ml  2mm  2mn  2mp  2mq  2mr  2ms  2mt  2mv  2mw  
  60.      2m.   2m'.  2m''  
  61. 1n   2nb   2nc   2nd   2nf  2ng  2nk  2nl  2nm  2nn  2np  2nq  2nr  2ns  n2s3r
  62.      2nt   2nv   2nz   n2g3n     2nheit.   2n.  2n'  2n'' 
  63. 1p   2pd   p2h   p2l  2pn  2pp  p2r  2ps  2pt  2pz  2p.  2p'. 2p''  
  64. 1q   2qq   2q.   2q'. 2q''  
  65. 1r   2rb   2rc   2rd  2rf  r2h  2rg  2rk  2rl  2rm  2rn  2rp 
  66.      2rq   2rr   2rs  2rt  rt2s3 2rv 2rx  2rw  2rz  2r.  2r'. 2r''  
  67. 1s2  2shm  2s3s  2s3p2n    2stb 2stc 2std 2stf 2stg 2stm 2stn 2stp 2sts 2stt 2stv 2sz  
  68.      4s.   4s'.  4s'' 
  69. 1t   2tb   2tc   2td  2tf  2tg  t2h  t2l  2tm  2tn  2tp  t2r  2ts  3t2sch 
  70.      2tt   2tv   2tw  t2z  2tzk 2tzs 2t.  2t'. 2t''  
  71. 1v   2vc   2vl   v2r  2vv  2v.  2v'. 2v''  
  72. 1w   w2h   wa2r  2w1y 2w.  2w'. 2w''  
  73. 1x   2xw   2x.   2x'. 2x'' 
  74. y1ou y1i  
  75. 1z   2zb   2zd   2zl  2zn  2zp  2zt  2zs  2zv  2zz  2z.  2z'. 2z''  .z2
  76. }                          % Pattern end
  77.  
  78. \endinput
  79.  
  80. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Information %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  81.  
  82. I have been working on patterns for the Italian language since 1987; in 1992
  83. I published
  84.  
  85. C. Beccari, "Computer aided hyphenation for Italian and Modern
  86.       Latin", TUG vol. 13, n. 1, pp. 23-33 (1992)
  87.  
  88. which contained a set of patterns that allowed hyphenation for both Italian
  89. and Latin; a sligtly modified version of the patterns published in the
  90. above paper is contained in LAHYPH.TEX available on the CTAN archives.
  91.  
  92. From the above patterns I extracted the minimum set necessary for
  93. hyphenating Italian that was made available on the CTAN archives with the
  94. name ITHYPH.tex the latest version being version 3.5 with version date 
  95. 16 august 1994.
  96.  
  97. That pattern set required 37 ops; being interested in a local version
  98. of TeX/LaTeX capable of dealing with half a dozen languages, I wanted to
  99. reduce memory occupation and therefore the number of ops.
  100.  
  101. This new version (4.0) of ITHYPH.TEX is much simpler than version 3.5
  102. and requires just 29 ops while it retains all the power of version 3.5,
  103. but contains many more new patterns that allow to hyphenate unusual
  104. words that generally have a root borrowed from a foreign language.
  105. Updated versions 4.1 and 4.2 contain minor additions and the number of ops
  106. is increased to 30.
  107.  
  108. This new pattern set has been tested with the same set of difficult Italian
  109. words that was used to test version 3.5 and it yields the same results (a 
  110. part a minor change that was deliberately introduced so as to reduce the 
  111. typographical hyphenation (opposed to grammatical hyphenation) of some 
  112. vocalic groups.)
  113.  
  114. It has been tested with a larger set of words that previously were 
  115. incorrectly hyphenated with version 3.5, although no error had been reported, 
  116. because such words are of very specialized nature and are seldom used.
  117.  
  118. As the previous version, this new set of patterns does not contain
  119. any accented character so that the hyphenation algorithm behaves properly
  120. in both cases, that is with cm or dc fonts (provided that with the
  121. latter suitable  macros are activated in order to map sequences such
  122. as \`a into the proper character ("E0) of the extended set, and that its
  123. \lccode is defined).  Of course if you use dc fonts (or the virtual fonts
  124. for which suitable 256 glyph mappings have been set up, for example the
  125. mapped PostScrip fonts) you get the full power of the hyphenation
  126. algorithm, while if you use cm fonts you miss some possible break points;
  127. this is not a big inconvenience in Italian because:
  128.  
  129. 1) The Regulation UNI 6015 on accents specifies that compulsory accents 
  130.    appear only on the ending vowel of oxitone words; this means that it is 
  131.    almost indifferent to have or to miss the dc fonts and their special 
  132.    facilities because the only difference consists in how TeX evaluates the 
  133.    end of the word; in practice if you have these special facilities you get
  134.    "qua-li-t\`a", while if you miss them, you get "qua-lit\`a" (assuming
  135.    that \righthyphenmin > 1).
  136.  
  137. 2) Optional accents are so rare in Italian, that if you absolutely want 
  138.    to use them in those rare instances, and you miss the dc or virtual font
  139.    facilities, you should also provide explicit discretionary hyphens 
  140.    as in "s\'e\-gui\-to".
  141.  
  142. There is no explicit hyphenation exception list because these patterns
  143. proved to hyphenate correctly a very large set of words suitably chosen in
  144. order to test them in the most heavy circumstances; these patterns were used
  145. in the preparation of a number of books and no errors were discovered.
  146.  
  147. Should you find any word that gets hyphenated in a wrong way, please, AFTER
  148. CHECKING ON A RELIABLE MODERN DICTIONARY, report to the author, preferably
  149. by e-mail.
  150.  
  151.                       ATTENTION !!!
  152.  
  153. Patterns (for any language, not only for Italian) must be loaded while
  154. running iniTeX or whatever the name of the TeX initializer of your system!
  155.  
  156. Before loading these Italian patterns you must issue the commands
  157.  
  158. \chardef\l@english=0
  159. \newlanguage\l@italian
  160.  
  161. as it is recommended in BABEL (see the BABEL package and its documentation), 
  162. then you can load the patterns.
  163.  
  164. The simplest way to do the job with LaTeX2e is to create the file hyphen.cfg
  165. where you include the following
  166.  
  167. %%
  168. \InputIfFileExists{hyphen.tex}%
  169.    {\message{Loading hyphenation patterns for US English.}%
  170.     \language=\l@english
  171.     }%
  172.    {\errhelp{The configuration for hyphenation is incorrectly
  173.              installed.^^J%
  174.              If you don't understand this error message you need
  175.              to seek^^Jexpert advice.}%
  176.     \errmessage{OOPS! I can't find any hyphenation patterns for
  177.                 US English.^^J \space Think of getting some or the
  178.                 latex2e setup will never succeed}\@@end}
  179. %%
  180. \InputIfFileExists{ithyph.tex}%
  181.    {\message{Loading hyphenation patterns for Italian.}%
  182.     \language=\l@italian
  183.     \lccode`\'=`\'
  184.     }%
  185.    {\errhelp{The configuration for hyphenation is incorrectly
  186.              installed.^^J%
  187.              If you don't understand this error message you need
  188.              to seek^^Jexpert advice.}%
  189.     \errmessage{OOPS! I can't find any hyphenation patterns for
  190.                 Italian.^^J \space Think of getting some or the
  191.                 latex2e setup will never succeed}\@@end}
  192.  
  193. then you run the initializer and possibly move the format file in the
  194. directory/folder where it is supposed to reside.
  195.  
  196. When you run your .tex files you can invoke the Italian hyphenation rules with
  197. the BABEL instruction \selectlanguage{italian} or you might invoke them in a
  198. simpler way (that is without changing the caption names and the special
  199. Italian typesetting tricks) by defining:
  200.  
  201. \def\italiano{\language=\l@italian \lccode`'=`' \righthyphenmin=2}
  202.  
  203. You can then issue the command \italiano (possibly within group delimiters
  204. if you are typesetting a bilingual document) whenever you set Italian text;
  205. check also with the command \foreignlanguage{<language>}{<text>} defined in
  206. BABEL (version 3.5).
  207.  
  208. Happy multilingual typesetting !
  209.